package com.cm.figure.utility;

import com.cm.figure.model.Data.Data;
import com.cm.figure.model.Data.Meta;
import com.cm.figure.model.DataMap.DataMap;

/**
 * ClassName:BuildData
 * Package:com.cm.figure.utility
 * Description:
 *
 * @Date:2021/8/14 16:24
 * @com.chuangmei
 */
public class BuildData {

    public static Data buildData(Object obj, String Message , Integer status) {
        //创建返回数据
        Data data = new Data();
        Meta meta = new Meta();
        meta.setMessage(Message);
        meta.setStatus(status);
        data.setData(obj);
        data.setMeta(meta);
        return data;
    }
    public static DataMap buildDataMap(String Message , Integer status) {
        //创建返回数据
        DataMap dataMap = new DataMap();
        Meta meta = new Meta();
        meta.setMessage(Message);
        meta.setStatus(status);
        dataMap.setMeta(meta);
        return dataMap;
    }

}
